﻿<UserControl x:Class="ModernUIApp1.Pages.SplitPage1"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             xmlns:m="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Style="{StaticResource ContentRoot}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="6"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <ScrollViewer Margin="{StaticResource SplitLeft}">
            <StackPanel MinWidth="121">
                <ListView Margin="10" Name="tracksBinding" Height="Auto" Width="Auto">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <WrapPanel>
                                <TextBlock Text="Name: " />
                                <TextBlock Name="name" Text="{Binding name}" />
                                <TextBlock Text=", Length: " />
                                <TextBlock Name="length" Text="{Binding length}" />
                            </WrapPanel>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                    <ListView.ItemContainerStyle>
                        <Style TargetType="ListViewItem">
                            <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListViewItem_PreviewMouseLeftButtonDown" />
                        </Style>
                    </ListView.ItemContainerStyle>
                </ListView>
            </StackPanel>
        </ScrollViewer>
        <GridSplitter Grid.Column="1" />
        <ScrollViewer Grid.Column="2 " Margin="{StaticResource SplitRight}">
            <StackPanel>
                <m:Map Name="trackMap"
                       Center="-1.968494, 30.036240"
                       ZoomLevel="10"
                       CredentialsProvider="AtaQdo79vEWtu1oRb07rZWL06vysu3o_jFLQanDROuiRdxp4f0z0OeQOveLcpOep"
                       Mode="Road" MinHeight="400" Height="Auto" Width="Auto" ></m:Map>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>
